/**
 * 
 */
package cosc617_blackteam;


/**
 * This seating strategy will seat a party in the smallest fitting table as they come in.
 * @author Laura
 *
 */
public class FIFOSeatingStrategy implements I_SeatingStrategy {
	TableCollections tableList;
	public FIFOSeatingStrategy(TableCollections tableList){
		this.tableList = tableList;
		
	}
	/* (non-Javadoc)
	 * @see cosc617_blackteam.I_SeatingStrategy#addParty(cosc617_blackteam.CustomerParty)
	 */
	@Override
	public boolean addParty(CustomerParty party) {
		for(Table table : tableList){
			if (table.addCustomerParty(party))
				return true;
		}
		return false;
	}

}
